<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<html>
  <head>    
    <title></title>
  </head>
  <body>
  	<%
  		request.setCharacterEncoding("utf-8");
  		String name=request.getParameter("name");
  		String pwd=request.getParameter("pwd");
  		if(name.equals("张三") && pwd.equals("123")){
  			response.sendRedirect("ex1.jsp");
  		}else{
  			out.print("用户或密码不正确，请重新输入");
  			out.print("<br>两秒钟后，自动跳转到登录界面!");
  			response.setHeader("refresh", "2;URL=ex2.jsp");
  		}
  	 %>
  </body>
</html>




